package com.bsoft.controller.JSON;


import com.bsoft.service.EcgService;
import com.bsoft.service.MedicareService;
import com.bsoft.utils.JSONUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/** 医保控制器 MedicareController*/
@Controller
@RequestMapping(value = "JSON/MEDICARE")
public class MedicareController {
    private static Logger logger = LoggerFactory.getLogger(MedicareController.class);

    @Autowired
    private MedicareService medicareService;

    /**
     * 医保数据补录
     */
    @RequestMapping(value = "saveMedicareData", produces = "application/json;charset=utf-8", method = RequestMethod.POST)
    @ResponseBody
    public String saveMedicareData(@RequestBody Map<String,Object> req) throws Exception {
        logger.info("医保:数据补录:入参:" + JSONUtil.map2Json(req));
        String res = medicareService.saveMedicareData(req);
        logger.info("医保:数据补录:出参:" + res);
        return res;
    }
}
